package com.yang.moyu.meta.system.service.impl;

import com.yang.moyu.meta.common.param.BasePageParam;
import com.yang.moyu.meta.common.param.BaseParam;
import com.yang.moyu.meta.system.domain.SysRole;
import com.yang.moyu.meta.system.mapper.SysRoleMapper;
import com.yang.moyu.meta.system.params.SysRoleParam;
import com.yang.moyu.meta.system.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

/**
 * Create by 10296 on 2021/12/16
 *
 * @Description:
 */

@Service
public class SysRoleServiceImpl implements SysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;


    @Override
    public List<SysRole> getSysRole(BasePageParam baseParam) {
        return sysRoleMapper.getSysRole(baseParam);
    }

    @Override
    public SysRole getSysRoleById(Serializable id) {
        return sysRoleMapper.getSysRoleById(id.toString());
    }

    @Override
    public boolean addSysRole(SysRoleParam sysRoleParam) {
        return sysRoleMapper.saveSysRole(sysRoleParam);
    }

    @Override
    public boolean updateSysRole(SysRoleParam sysRoleParam) {


        return sysRoleMapper.updateSysRole(sysRoleParam);
    }

    @Override
    public boolean delSysRole(BaseParam params) {

        return sysRoleMapper.updateSysRole((SysRoleParam) params);
    }


}
